package com.gyg.domain;

import cn.afterturn.easypoi.excel.annotation.Excel;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import lombok.experimental.Tolerate;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 用户信息表
 * </p>
 *
 * @author gyg
 * @since 2021-02-20
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@Builder
public class CloudUser implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    @Excel(name = "编号", width = 20, height = 20)
    private Integer id;

    /**
     * 账号
     */
    @Excel(name = "账号", width = 20)
    private String username;

    /**
     * 密码
     */
    private String password;

    /**
     * 姓名
     */
    @Excel(name = "用户名", width = 20)
    private String name;

    /**
     * 国家
     */
    @Excel(name = "国家", width = 20)
    private String country;

    /**
     * 省份
     */
    @Excel(name = "省份", width = 20, replace = {"-_null"})
    private String province;

    /**
     * 城市
     */
    @Excel(name = "城市", width = 20, replace = {"-_null"})
    private String city;

    /**
     * 性别（0=其他，1=男，2=女）
     */
    @Excel(name = "性别", replace = {"-_null", "男_1", "女_2"}, width = 20)
    private Integer sex;

    /**
     * 头像地址
     */
    @Excel(name = "头像", type = 2, imageType = 1, width = 20)
    private String picPath;

    /**
     * 手机号
     */
    @Excel(name = "手机号", width = 20)
    private String mobile;

    /**
     * 验证码
     */
    @Excel(name = "注册验证码", width = 20)
    private String code;

    /**
     * 权限标记：0=普通用户;1=管理员用户
     */
    @Excel(name = "用户权限", replace = {"普通用户_0", "管理员用户_1"}, width = 20)
    private Integer admin;

    /**
     * 是否封禁，0=正常，1=已封禁
     */
    @Excel(name = "用户状态", replace = {"正常_0", "已封禁_1"}, width = 20)
    private Integer ban;

    /**
     * 创建时间
     */
    @Excel(name = "注册时间", databaseFormat = "yyyyMMddHHmmss", format = "yyyy-MM-dd HH:mm:ss", width = 20)
    private LocalDateTime createdDate;

    /**
     * 修改时间
     */
    @Excel(name = "最近修改时间", databaseFormat = "yyyyMMddHHmmss", format = "yyyy-MM-dd HH:mm:ss", width = 20)
    private LocalDateTime modifiedDate;

    /**
     * 删除标记：0=正常;1=已删除
     */
    private Integer deleted;
}
